/*******
 * freeMem.h
 *
 * author: Will Lamond
 *
 *
 *
 ******/
#ifndef	_FREEMEM_H_
#define	_FREEMEM_H_
#include "glob.h"

typedef struct _LISTITERATOR {
	FREEMEMLIST *list;
	MEMNODE *curNode;
} LISTITERATOR;

 int addNode(FREEMEMLIST *list, int base, int end);

 int removeNode(FREEMEMLIST *list, int baseOfProc, int endOfProc);

 int initList(FREEMEMLIST **newList, int size);

 int initIterator(LISTITERATOR *it, FREEMEMLIST *list);

 int getNext(LISTITERATOR *it, int *base, int *end, int *size);

 int FindFirstFit(FREEMEMLIST *ml, int size);

 int FindBestFit(FREEMEMLIST *ml, int size);

#endif
